printback=OFF.

TITLE LIS Cross-section Data center in Luxembourg.

TITLE email: usersupport@lisdatacenter.org .

TITLE LIS Self Teaching Package 2022.

TITLE Part II: Gender, employment, and wages.
TITLE SPSS version.

TITLE last change of this version of the syntax: 15-01-2022.


TITLE Exercise 3: Family structure and employment.

define ex23 (). 
select if age ge 25 and age le 54. 
select if relation ge 1000 and relation le 2200. 
select if sex eq 2.
weight by ppopwgt. 
recode ageyoch (0 thru 5=1) (6 thru 17=2) (ELSE=0) into achildcat.
add value labels achildcat 
   0 "no children under 18" 
   1 "under 6 years" 
   2 "6-17 years". 
sort cases by dname partner. 
split file by dname partner. 
crosstabs achildcat by emp /cells = row. 
!enddefine . 

match files file = us04p    
  /table = us04h   
  /keep=did hid own dname pwgt ppopwgt relation partner ageyoch age sex immigr educ educ_c emp status1 ptime1 hwage1   
  /by hid. 
  
save outfile = "mydata\us04_yid.sav". 
  
match files file = be04p    
  /table = be04h   
  /keep=did hid own dname pwgt ppopwgt relation partner ageyoch age sex immigr educ educ_c emp status1 ptime1 hwage1   
  /by hid.   
  
save outfile = "mydata\be04_yid.sav". 
  
match files file = gr04p    
  /table = gr04h   
  /keep=did hid own dname pwgt ppopwgt relation partner ageyoch age sex immigr educ educ_c emp status1 ptime1 hwage1   
  /by hid.   
  
save outfile = "mydata\gr04_yid.sav".   

add file file = "mydata\us04_yid.sav"   
         /file = "mydata\be04_yid.sav"   
         /file = "mydata\gr04_yid.sav". 
		 
save outfile = "mydata\stackex_yid.sav".   
get file = "mydata\stackex_yid.sav". 
ex23.
